﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Strive.Util.Text;
using Strive.Util.Logging;
using Strive.Core.Validations;
using Strive.Core.Service;
using Strive.Core.Translators;
using Strive.Util.Maths;
using Strive.Reflection;
using Strive.Aspects;
using OTA.Notification.Entity;
using OTA.Notification.Entity.Adapter;
using Strive.DataAccess;

namespace OTA.Notification.Entity.Rule
{
    [Serializable]
    [Table(Name = "MSG_SEND_RULE")]
    public class MsgRuleConfigBean
    {
        #region Private 成员

        private Int64 _id;

        private string _msg_type_code = String.Empty;
        private string _name = String.Empty;
        private string _ower = String.Empty;
        private string _create_user_name = String.Empty;

        private DateTime _create_time = new DateTime(1900, 1, 1);

        private string _last_update_user_name = String.Empty;
        private DateTime _last_update_time = new DateTime(1900, 1, 1);

        #endregion

        #region Public 成员


        [Column(Name = "RULE_ID"), PK]
        public Int64 ID
        {
            get { return _id; }
            set
            {

                _id = value;

            }
        }

        [Column(Name = "MSG_TYPE_CODE")]
        public string MsgTypeCode
        {
            get { return _msg_type_code; }
            set
            {

                if (value == null) return;
                if (_msg_type_code as object == null || !_msg_type_code.Equals(value))
                {
                    _msg_type_code = value;
                }
            }
        }

        [Column(Name = "RULE_NAME")]
        public string RuleName
        {
            get { return _name; }
            set
            {

                if (value == null) return;
                if (_name as object == null || !_name.Equals(value))
                {
                    _name = value;
                }
            }
        }

        [Column(Name = "OWNER")]
        public string Owner
        {
            get { return _ower; }
            set
            {

                if (value == null) return;
                if (_ower as object == null || !_ower.Equals(value))
                {
                    _ower = value;
                }
            }
        }

        /// <summary>
        /// 属性名称：CreateUserName
        /// 属性描述：
        /// 字段信息：[CREATE_USER_NAME],nvarchar
        /// </summary>
        [Column(Name = "CREATE_USER_NAME")]
        public string CreateUserName
        {
            get { return _create_user_name; }
            set
            {

                if (value == null) return;
                if (_create_user_name as object == null || !_create_user_name.Equals(value))
                {
                    _create_user_name = value;
                }
            }
        }

        /// <summary>
        /// 属性名称：CreateTime
        /// 属性描述：
        /// 字段信息：[CREATE_TIME],datetime
        /// </summary>
        [Column(Name = "CREATE_TIME")]
        public DateTime CreateTime
        {
            get { return _create_time; }
            set
            {

                {
                    _create_time = value;
                }
            }
        }

        /// <summary>
        /// 属性名称：LastUpdateUserName
        /// 属性描述：
        /// 字段信息：[LAST_UPDATE_USER_NAME],nvarchar
        /// </summary>
        [Column(Name = "LAST_UPDATE_USER_NAME")]
        public string LastUpdateUserName
        {
            get { return _last_update_user_name; }
            set
            {

                if (value == null) return;
                if (_last_update_user_name as object == null || !_last_update_user_name.Equals(value))
                {
                    _last_update_user_name = value;
                }
            }
        }

        /// <summary>
        /// 属性名称：LastUpdateTime
        /// 属性描述：
        /// 字段信息：[LAST_UPDATE_TIME],datetime
        /// </summary>
        [Column(Name = "LAST_UPDATE_TIME")]
        public DateTime LastUpdateTime
        {
            get { return _last_update_time; }
            set
            {

                {
                    _last_update_time = value;
                }
            }
        }

        #endregion 
    }
}
